package homework0309;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo03 {
    public static void main(String[] args) {
        System.out.println("开始");
        FileOutputStream fos=null;
        try{
            fos=new FileOutputStream("dat.txt");
            fos.write(3);
        }catch (IOException e){
            System.out.println("发生异常并解决");
        }finally {
            try {
                fos.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }




        System.out.println("结束");

    }
}
